#!/bin/bash
wget https://download.java.net/java/ga/jdk11/openjdk-11_linux-x64_bin.tar.gz -O /tmp/openjdk-11+28_linux-x64_bin.tar.gz

tar xfvz /tmp/openjdk-11+28_linux-x64_bin.tar.gz --directory /usr/lib/jvm/

rm /etc/alternatives/java

ln -s /usr/lib/jvm/jdk-11/bin/java /etc/alternatives/java

java -version